package org.springblade.task.base.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.task.base.entity.BaseUserVisitLog;
import org.springblade.task.base.mapper.BaseUserVisitLogMapper;
import org.springblade.task.base.param.BaseUserParam;
import org.springblade.task.base.service.IBaseUserVisitLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: TODO
 * @author syncwt
 * @date ${date} ${time}
 * @version V1.0
 */
@Service
public class BaseUserVisitLogServiceImpl extends ServiceImpl<BaseUserVisitLogMapper, BaseUserVisitLog> implements IBaseUserVisitLogService {

	@Autowired
	BaseUserVisitLogMapper baseUserVisitLogMapper;

	/**
	 * 查询今日站内登陆用户
	 * @param param
	 * @return
	 */
	@Override
	public Integer queryByTodayStationUserList(BaseUserParam param) {
		return baseUserVisitLogMapper.queryByTodayStationUserList(param);
	}

	/**
	 * 查询今日登陆用户
	 * @param param
	 * @return
	 */
	public List<String> queryByTodayUserList(BaseUserParam param) {
		return baseUserVisitLogMapper.queryByTodayUserList(param);
	}

	/**
	 * 查询今日活跃用户数
	 * @param param
	 * @return
	 */
	public Integer queryActiveUsersCount(BaseUserParam param) {
		return baseUserVisitLogMapper.queryActiveUsersCount(param);
	}
}
